home *** CD-ROM | disk | FTP | other *** search
- Path: giane.cs.umass.edu!ramanath
- From: ramanath@giane.cs.umass.edu (Kumaresan Ramanathan)
- Newsgroups: comp.lang.c
- Subject: Digest, Macro disadv
- Date: 15 Jan 1996 19:29:34 GMT
- Organization: CS Dept., Umass-Amherst
- Message-ID: <4de9uu$ptv@kernighan.cs.umass.edu>
- NNTP-Posting-Host: giane.cs.umass.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi,
- Some time last week I had asked about the disadvantages of using macros
- instead of a code generator to extend the C language.
- The responses were quite interesting, but many repeated the disadvantages
- I had already mentioned in my original posting.
- As I promised this is the digest of what was new.
- If I missed anything or anybody's contribution, please accept my apologies.
- I did my best to keep track of the thread.
-
- 1) Macros cannot define other macros.
- Though this may not be immediately obvious, it really is useful
- to be able to define macros using other macros. I do not want to start a
- flame war about safety of macros, but this point is important. CPP is not
- really very powerful and in many cases it is insufficient.
-
- 2) Macros are capable only of simple inserts. That is macro expansion is not
- very intelligent or programmable.
-
- Thanks. to all those who responded.
- --- Kumaresan
-